<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录</title>
    <script src="javascripts/jquery-3.4.1.min.js"></script>
    <script>
    function getVCode(){
        var tel = 'http://localhost:3000/register/getVCode' 
        $.get(tel,{telephone:document.querySelector('#txtTelephone').value},function(results){
            console.log(results)
            if(results.data != 0){
                alert('验证码获取失败！')
            }else{
                alert('验证码已经发送，请查收！')
            }
        })
    }
    </script>
</head>
<body>
    <form action="http://localhost:3000/register/login" method="POST">
        手机号：<input type="text" name='txtTelephone' id='txtTelephone'><br/>
        密码：<input type="password" name='txtPwd' id='txtPwd'><br/>
        验证码：<input type="text" name='txtVCode' id='txtVCode'>
        <input type="button" value='获取验证码' onclick='getVCode()'>
        <br/>
        <input type="submit" value='登录'>
    </form>
</body>
</html>